<template>
    <div>
        <button @click="doClient">doClient</button>
    </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { httpClient } from '@/api/service/HttpClient'
import { IHttpClientRequestParameters } from '@/api/service/IHttpClientRequestParameters'
import DummyRequest from '@/api/service/demo1'

@Component({})
export default class AxiosHttpClientTest extends Vue {
    name = '';
    doClient(){
        let data = this.fetchItems();
        console.log(data);
    }
    fetchItems():Promise<Item[]>{
        const getParameters:IHttpClientRequestParameters<any> = {
            url:"/api/json/getJson",
            requiresToken:false
        }
        return httpClient.get<Item[]>(getParameters);
    }
}
</script>

<style scoped>

</style>
